package com.moter.one.wyydemo1.controller;

import com.moter.one.wyydemo1.entity.SongInfo;
import com.moter.one.wyydemo1.service.SongInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class NewSongs {
   @Autowired
    SongInfoService songInfoService;
   @RequestMapping("/NewSongs")
   public List<SongInfo> getTop10NewSongs(){
       List<SongInfo> list = songInfoService.selectSongInfoTop10_Collected_Mapper();
       //System.out.println(list);
       return list;
   }
}
